import { Regex } from './dist'
let regInp = document.querySelector('.regex'),
    strInp = document.querySelector('.input'),
    strOut = document.querySelector('.output'),
    btn = document.querySelector('button')

btn.addEventListener('click', (e) => {
    console.log(1)
    if(!regInp.value || !strInp.value) {
        alert('输入不完全')
        return
    }
    let val = regInp.value
    let expre = Regex.compile(regInp.value)
    let result = expre.isMatch(strInp.value)
    expre.dfaGraph.print()
    expre.nfaGraph.print()
    console.log('result', result)
    strOut.value = result
})